package L1job;

import java.util.Scanner;

public class DemoTest {
    public static void main(String[] args) {
        StudentsManager manager=new StudentsManager();
        Scanner sc =new Scanner(System.in);
        boolean flag=true;
        while(flag){
            System.out.println("1.根据学号查看学员信息    2.添加学员    3.查看所有学员信息   4.删除学员");
            int in=sc.nextInt();
            switch(in){
                case 1:
                    System.out.println("请输入学号");
                    String num=sc.next();
                    manager.Read_Student(num);
                    break;
                case 2:
                    System.out.println("请输入学员学号");
                    String number=sc.next();
                    System.out.println("请输入学员名字");
                    String name=sc.next();
                    System.out.println("请输入学员性别");
                    String sex=sc.next();
                    manager.Add_Students(number,name,sex);
                    break;
                case 3:
                    manager.Read_Students();
                    break;
                case 4:
                    System.out.println("请输入学员学号");
                    String number2=sc.next();
                    manager.Del_Students(number2);
                    break;
                default:
                    System.out.println("请选择正确项");
            }
            System.out.println("是否继续输入？yes/no");
            String goon=sc.next();
            if(goon.equals("no")){
                flag=false;
            }
        }

    }
}
